package com.android.flickr;
//			String s = secret+"api_key"+api_key+"auth_token"+auth_token;//+description+title;
//			System.out.println("String Data: "+ s);
//			MessageDigest md= MessageDigest.getInstance("MD5");
//			md.update(s.getBytes(),0,s.length());
////			md.h
//			byte[] byteSig = md.digest();
//			
//			StringBuffer hexString = new StringBuffer();
//			for (int i=0;i<byteSig.length;i++) {
//				String hex = Integer.toHexString(0xFF & byteSig[i]);
//				if (hex.length() == 1) {
//				    // could use a for loop, but we're only dealing with a single byte
//				    hexString.append('0');
//				}
//				hexString.append(hex);
//
//			}
//			System.out.println("API Signature: "+hexString);
//			api_sig = hexString.toString();
//
//
//			List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(4);
//
//	        String urlString = "http://api.flickr.com/services/upload/";
//
//	        String POST = "---------------------------7d44e178b0434\r\n";
//	        POST += "Content-Disposition: form-data; name=\"api_key\"\r\n";
//	        POST += api_key+"\r\n";
//	        POST += "---------------------------7d44e178b0434\r\n";
//	        POST += "Content-Disposition: form-data; name=\"auth_token\"\r\n";
//	        POST += auth_token+"\r\n";
//	        POST += "---------------------------7d44e178b0434\r\n";
//	        POST += "Content-Disposition: form-data; name=\"api_sig\"\r\n";
//	        POST += api_sig+"\r\n";
//	        POST += "---------------------------7d44e178b0434\n";
//	        POST += "Content-Disposition: form-data; name=\"photo\";"; //No \r\n needed here
//	        POST += "filename=\""+photo+"\"\r\n";
//	        POST += "Content-Type: image/jpeg\r\n";
//	        POST += "{RAW JFIF DATA}\r\n";
//	        POST += "---------------------------7d44e178b0434--\r\n";
//	        System.out.println(POST);
//	        URL url = new URL(urlString);
//	        HttpURLConnection conn = null; 
//	        conn = (HttpURLConnection) url.openConnection();
//	        conn.setDoInput(true);
//	        conn.setDoOutput(true);
//	        conn.setUseCaches(false);
//	        conn.setRequestMethod("POST");
//	        
//	        conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=---------------------------7d44e178b0434");
//	        DataOutputStream dos = new DataOutputStream(conn.getOutputStream());
//	        dos.writeBytes(POST);
//	        nameValuePairs.add(new BasicNameValuePair("", POST)); 
//
//	        
//            BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
//	        String line;
//	        while ((line = rd.readLine()) != null) {
//	            // Process line...
//	        	System.out.println("Response from Flickr: "+line);
//	        }
//	        dos.close();
//	        rd.close();
		
//		catch (IOException e) {
//			System.out.println("ERROR: Something is effed");
//		}